package cheme.ProcessEditor.Figures;

import org.eclipse.draw2d.ToolbarLayout;

public abstract class AbstractResizableGroupFig extends AbstractPresentableFig
{
	public static final boolean ALIGN_VERTICAL = true;
	public static final boolean ALIGN_HORIZONTAL = false;
	
	public static final boolean STRETCH_CHILDREN = true;
	public static final boolean DONT_STRETCH_CHILDREN = false;
		
//	public static final int MAX_CHILD = SWT.DEFAULT;
//	public static final int SUM_CHILDREN = 0;
	
	protected static final int insideSpacing = 1;
	protected static final int insetSpacing = 1;
	
	protected ToolbarLayout layout;
	
	public AbstractResizableGroupFig()
	{
		super();
		
		layout = new ToolbarLayout();
		layout.setMinorAlignment(ToolbarLayout.ALIGN_TOPLEFT);
		layout.setStretchMinorAxis(true);
		layout.setObserveVisibility(true);
		layout.setSpacing(insideSpacing);
		setLayoutManager(layout);
	}
	
	public AbstractResizableGroupFig(boolean stretchChildren)
	{
		this();
		layout.setStretchMinorAxis(stretchChildren);
	}
	
//	public AbstractResizableGroupFig(Border border)
//	{
//		this();
//		setBorder(border);
//	}
	
	
	
	
}
